<template>
	<view>
		<headerCome @baocUNsmen="baocUNsmen"></headerCome>
		<view class="" style="padding: 24rpx;">
			<div class="title">技能标签</div>
			<view class="labelInput">
				<input type="text" v-model="labelInputValue"  placeholder-style="color:#8F9294" placeholder="请输入技能标签"/>
				<view class="comenstMEngs" @click="tianiaNeirong">
					<image style="width: 20rpx;height: 20rpx;" src="../../static/tianjai.png" mode=""></image>
					添加
				</view>
			</view>
			<view class="labelConte">
				<view class="labelList" v-for="(item,index) in labelList">
					{{item}}
					<image @click="deleteFuns(item,index)" style="width: 16rpx;height: 16rpx;margin-left: 24rpx;" src="../../static/quxiaoCone.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import headerCome from "@/components/header-top.vue"
	import {
		Request
	} from '@/utils/request.js'
	export default{
		components:{
			headerCome
		},
		data(){
			return {
				labelInputValue:"",
				labelList:[],
			}
		},
		onLoad({label}) {
			this.labelList=label.split(',');
		},
		methods:{
			tianiaNeirong(){
				this.labelList.push(this.labelInputValue)
				this.labelInputValue='';
			},
			deleteFuns(e,indx){
				 this.labelList.splice(indx,1)
				 this.labelList =this.labelList ;
			},
			baocUNsmen(){
				// ule:'/labelInformation'
				Request('user/curriculum_vitae/labelInformation',{
					'label':this.labelList.join(',')
				},"POST").then(({})=>{
					uni.navigateTo({
						url:`/resume/onLine/index?type=1`
					})
				})
			}
		}
	}
</script>

<style>
	.comenstMEngs{
		font-size: 28rpx;
		color: #3B5EEC;
	}
	.labelList{
		height: 64rpx;
		line-height: 64rpx;
		background: #F2F4F7;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		display: flex;
		align-items: center;
		color: #646669;
		font-style: normal;
		text-transform: none;
		padding: 0 24rpx;
		margin-right: 24rpx;
		margin-bottom: 24rpx;
	}
	.title{
		width: 160rpx;
		height: 56rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #0D0E0F;
		text-align: left;
		font-style: normal;
		text-transform: none;
		margin-bottom: 40rpx;
	}
	.labelConte{
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		margin-top: 20rpx;
	}
	.labelInput{
		width: 702rpx;
		height: 100rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 40rpx;
		background: #F2F4F7;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	
</style>